package com.example.swim.Pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

/**
 * @author LiYa
 * @create 2022-07-14 12:46
 */
@Data
@TableName("classroom")
public class ClassRoom {
//    关掉自增约束

    @TableId(value="cid",type = IdType.AUTO)
    public Integer cid;
    public String name;
    public String description;
    public String age;              //年龄段
    public String kind;                //游泳类型
    public String begin;                //上课
    public String last;
    public String start;
    public String end;                  //学期
    public String type;                 // 班级类别
    public String coachid;         //教练id
    public int num;             //人数
    @TableField(exist = false) //表示该属性不为数据库表字段，但又是必须使用的
    public List<Student> students;  //方便一对多查询


    public void setStudents(List<Student> students) {
        this.students = students;
    }
}
